<template>
  <div class="g-flex">
    <img class="up-advert-img" :src="values.poster" alt="" >
    <div class="g-m-l-10">
      <div class="up-name">{{values.title}}</div>
      <span>{{values.tag}}</span>
      <span class="g-m-l-10">{{values.title2}}</span>
    </div>
    <span class="g-m-l-a" @click="handleClick">:</span>
  </div>
</template>

<script>

export default {
  name: 'Advertisement',
  props: {
    values: {
      type: Object,
      default: function () {
        return {}
      }
    }
  },
  emits: ['click'],
  setup(props, ctx) {
    const handleClick = () => ctx.emit('click')

    return {
      handleClick
    }
  }
}
</script>

<style lang="scss" scoped>
.g-flex {
  display: flex;
}
.g-tc {
  text-align: center;
}
.g-m-t-10 {
  margin-top: 10px;
}
.g-m-l-10 {
  margin-left: 10px;
}
.g-m-l-a {
  margin-left: auto;
}
.up-advert-img {
  width: 54px;
  height: 34px;
  border-radius: 2px;
}
.up-name {
  height: 20px;
  font-size: 14px;
}
</style>